function PromoterActivityDynamicRange_Greens(TurqBleach, SCFPBleach)
%GETAUTOCORRELATION Summary of this function goes here
%   Detailed explanation goes here

%% Load colonies
% TurqBleach = LoadColonySet('mut1', 'all');
% SCFPBleach = LoadColonySet('mut2', 'all');

df_averCell = [];
nCellSCFP = 0;
for j=1:length(SCFPBleach)
    
    cell = SCFPBleach{j}.cell;
    for i=1:length(cell)
        if strcmp(cell(i).fate, 'd')
            df = cell(i).flscnc.df;
            df = df(~isnan(df));
            df_averCell = [df_averCell mean(df)];
            nCellSCFP = nCellSCFP + 1;
        end
    end
end
df_averCell = sort(df_averCell);
infLimFast = df_averCell(floor(0.01*length(df_averCell)));
supLimFast = df_averCell(ceil(0.99*length(df_averCell)));
rangeSCFP = supLimFast - infLimFast;

x = 0:100:2800;
[d_SCFP, c_SCFP] = hist(df_averCell, x);
d_SCFP = d_SCFP/sum(d_SCFP(:));

%% Data from slow FP
df_averCell = [];
nCellTurq = 0;
for j=1:length(TurqBleach)

    if j==3; continue, end;
    cell = TurqBleach{j}.cell;
    for i=1:length(cell)
        if strcmp(cell(i).fate, 'd')
            df = cell(i).flscnc.df;
            df = df(~isnan(df));
            df_averCell = [df_averCell median(df)];
            nCellTurq = nCellTurq + 1;            
        end
    end
end
df_averCell = sort(df_averCell);
infLimSlow = df_averCell(floor(0.01*length(df_averCell)));
supLimSlow = df_averCell(ceil(0.99*length(df_averCell)));   %!!!!!!!!!!!!!!!!!!!!!!
rangeTurq = supLimSlow - infLimSlow;

rangeSCFP/rangeTurq
nCellTurq
nCellSCFP

[d_mTurq, c_mTurq] = hist(df_averCell, x);
d_mTurq = d_mTurq/sum(d_mTurq(:));

%% 1st Fig 
figure_h = figure('Color', [1 1 1]);
plot(c_mTurq, d_mTurq, '-', 'LineWidth', 4, 'Color', [16 147 11]/255)
hold on;

xlim([-200 2800]);
ylim([0 0.34]);
ylabel('\fontsize{20}Frequency');
xlabel('\fontsize{20}Fluorescence Production Rate \rm(au\rm)');

set(gca,'box','off')
isholdonque = ishold; 
hold on 
ax = axis; 
plot(ax(2)*[1,1],ax(3:4),'k','linewidth',0.5) 
plot(ax(1:2),ax(4)*[1,1],'k','linewidth',0.5) 
if isholdonque == 0 
hold off 
end

factor = 0.275;
set(gca, 'FontSize', 16);
line([infLimFast supLimFast],[1 1]*1.1*factor, 'linewidth', 4, 'Color', [72 244 66]/255)
str1 = {'98% Dynamic Range Coverage'};
text(-170, 1.19*factor, str1, 'FontSize', 13.5, 'HorizontalAlignment', 'left')
str1 = {'Fast FP'};
text(1620, 1.105*factor, str1, 'FontSize', 16, 'HorizontalAlignment', 'left')

plot(c_SCFP, d_SCFP, '-', 'LineWidth', 4, 'Color', [72 244 66]/255)

line([infLimSlow supLimSlow],[1 1]*1.040*factor, 'linewidth', 4, 'Color', [16 147 11]/255)
str1 = {'Slow FP'};
text(970, 1.015*factor, str1, 'FontSize', 16, 'HorizontalAlignment', 'left')


%% 2nd Fig
figLog_h = figure('Color', [1 1 1]);
plot(c_mTurq, d_mTurq, '-', 'LineWidth', 4, 'Color', [16 147 11]/255)
hold on
plot(c_SCFP, d_SCFP, '-', 'LineWidth', 4, 'Color', [72 244 66]/255)

xlim([-50 2050]);
ylim([0 0.34]);
ylabel('\fontsize{20}Frequency');
xlabel('\fontsize{20}Fluorescence Production Rate \rm(au\rm)');

set(gca, 'YScale', 'log');
set(gca, 'FontSize', 16);

str1 = {'98% Dynamic Range Coverage'};
text(80, .00135, str1, 'FontSize', 15, 'HorizontalAlignment', 'left')

str1 = {'Slow FP'};
text(180, 0.0095, str1, 'FontSize', 20, 'HorizontalAlignment', 'left')
line([infLimSlow supLimSlow],[1 1]*0.007, 'linewidth', 4, 'Color', [16 147 11]/255)

str1 = {'Fast FP'};
text(400, 0.0028, str1, 'FontSize', 20, 'HorizontalAlignment', 'left')
line([infLimFast supLimFast],[1 1]*0.002, 'linewidth', 4, 'Color', [72 244 66]/255)


end
